package com.my.ads.lib.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;

import com.example.myadlib.R;
import com.my.ads.lib.AdSummary;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by xuanyang on 2018/3/6.
 */

public class GiftActivity extends BaseActivity {

    private List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
    private RelativeLayout wall_adx_ad, wall_banner, junkclean, booster;
    private ViewPager mViewPager;
    private View[] pages = new View[1];
    private FrameLayout fanhui;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gift);
        junkclean = (RelativeLayout) findViewById(R.id.junkclean);
        booster = (RelativeLayout) findViewById(R.id.booster);
        wall_adx_ad = (RelativeLayout) findViewById(R.id.wall_adx_ad);
        wall_banner = (RelativeLayout) findViewById(R.id.wall_banner);
        fanhui = (FrameLayout) findViewById(R.id.back);
        try {
            AdSummary.getInstance().showNativeAd(this, wall_adx_ad,false);
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            AdSummary.getInstance().showBannerAd(wall_banner);
        } catch (Exception e) {
            e.printStackTrace();
        }


        fanhui.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        junkclean.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(GiftActivity.this, JunkCleanActivity.class);
                startActivity(intent);
            }
        });
        booster.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(GiftActivity.this, MemoryBoostActivity.class);
                startActivity(intent);
            }
        });

    }
}
